package cn.wolfcode.luowowo.search.impl;

import cn.wolfcode.luowowo.repository.DestinationTemplateRepository;
import cn.wolfcode.luowowo.search.service.IDestinationSearchService;
import cn.wolfcode.luowowo.search.template.DestinationTemplate;
import org.apache.dubbo.config.annotation.Service;
import org.springframework.beans.factory.annotation.Autowired;

@Service
public class DestinationSearchServiceImpl implements IDestinationSearchService {

    @Autowired
    private DestinationTemplateRepository repository;

    /**
     * 游记对象的es保存操作
     */
    public void save(DestinationTemplate template) {
        repository.save(template);
    }

    /**
     *
     * @param name
     * @return
     */
    public DestinationTemplate getByName(String name) {
        return repository.findByName(name);
    }
}
